
import 'package:fluro/fluro.dart';
import 'package:flutter/cupertino.dart';
import 'package:ymApp/pages/channel/channel.dart';
import 'package:ymApp/pages/index/index.dart';
import 'package:ymApp/pages/index/search/search.dart';
import 'package:ymApp/pages/index/index_detail/index_detail.dart';
import 'package:ymApp/pages/news/news.dart';
import 'package:ymApp/pages/profile/profile.dart';

final indexHandle = Handler(
  handlerFunc:(BuildContext context, Map<String, List<String>> params) {
    return IndexPage();
  }
);

final profileHandle = Handler(
  handlerFunc:(BuildContext context, Map<String, List<String>> params) {
    return ProfilePage();
  }
);

final channelHandle = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params) {
      return ChannelPage();
    }
);

final newsHandle = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params) {
      return News();
    }
);

final indexDetailHandle = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params) {
      String id = params['id']?.first;
      return IndexDetailPage(id:id);
    }
);

final searchHandle = Handler(
    handlerFunc:(BuildContext context, Map<String, List<String>> params) {
      return SearchPage();
    }
);


